<template>
  <div class="consult_dialogue table-theme">
    <head-title title="公众号--聊天室"></head-title>
     <el-row :gutter="20">
        <el-col :span="5">
            <div class="search">
                <el-input
                    placeholder="搜索昵称"
                    prefix-icon="el-icon-search"
                    v-model="input2"
                    :clearable="true">
                </el-input>
            </div>
            <ul class="client-list">
                <li class="item" v-for="(item,index) in 10" :key="index">
                    <div class="item-head"></div>
                    <div class="item-text">
                        <p class="item-name">大猫</p>
                        <p class="item-news">1.家具大师是谁?</p>
                    </div>
                    <div class="item-date">03/28 07:38</div>
                </li>
            </ul>
        </el-col>
         <el-col :span="14">
            <div class="news">
                <h3>大猫</h3>
                <div class="news-list">
                    <em class="item-date">2021-04-16</em>
                    <div class="item-he">
                        <div class="item-he-head">
                            <el-image :src="require('@/assets/image/consult/service.png')"></el-image>
                        </div>
                        <div class="item-he-info">
                            <em>1.家具大师是谁</em>
                            <i class="item-he-date">10:01</i>
                        </div>
                    </div>
                    <div class="item-me">
                        <div class="item-me-head">
                            <el-image :src="require('@/assets/image/consult/service.png')"></el-image>
                        </div>
                        <div class="item-me-info">
                            <i class="item-he-date">10:01</i>
                            <em>您好</em>
                        </div>
                    </div>
                </div>
                <div class="news-input">
                    <div class="input-box">
                        <i class="el-icon-picture-outline"></i>
                        <el-input v-model="content" placeholder="请输入回复内容"></el-input>
                        <el-button class="btn">发送</el-button>
                    </div>
                </div>  
            </div>
         </el-col>
         <el-col :span="5">
            <div class="info">
                <h3>客户资料</h3>
                <ul>
                    <li v-for="(item,index) in infoList" :key="index">
                        <el-image :src="item.icon" fit="cover" style="width:30px;height:30px"></el-image>
                        <em>{{item.content}}</em>
                    </li>
                </ul>
            </div>
         </el-col>
     </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      input2:'',
      infoList:[
          {
              icon:require('@/assets/image/consult/name.png'),
              content:"大猫"
          },
          {
              icon:require('@/assets/image/consult/site.png'),
              content:"广州"
          },
          {
              icon:require('@/assets/image/consult/WeChat.png'),
              content:"damao"
          },
          {
              icon:require('@/assets/image/consult/phone.png'),
              content:"13211111110"
          },
          {
              icon:require('@/assets/image/consult/remark.png'),
              content:"大猫"
          }
      ],
      content:""
    };
  },
  components: {
   
  },
  methods: {
    
  },
  mounted() {
  },
};
</script>

<style lang="scss" scoped>
.consult_dialogue{
    height: 100%;
    .search{
        padding: 20px 14px;
        background-color: #fff;
        margin-bottom: 0;
        border-bottom: 1px solid #f8f8f8;
        /deep/ .el-input__inner{
            border: none;
            background-color: #f2f2f2;
            i{
                color: #999999;
            }
        }
    }
    .client-list{
        height: calc(100vh - 237px);
        overflow-y: scroll;
        overflow-x: hidden;
        background-color: #fff;
        &::-webkit-scrollbar {
            width: 0px;
        }
        .item{
            display: flex;
            padding: 20px;
            border-bottom: 1px solid #f8f8f8;
            &:hover{
                background-color: #f2f2f2;
                cursor: pointer;
            }
            .item-head{
                width: 50px;
                height: 50px;
                margin-right: 10px;
            }
            .item-text{
                flex: 1;
                .item-name{
                    font-size: 16px;
                    font-weight: 600;
                    color: #141414;
                }
                .item-news{
                    margin-top: 10px;
                    font-size: 14px;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                    color: #646464;
                }
            }
            .item-date{
                width: 80px;
                font-size: 14px;
                color: #999999;
            }
        }
    }
    .news{
        h3{
            height: 56px;
            line-height: 56px;
            text-align: center;
            font-size: 18px;
            color: #333;
            background-color: #fff;
            border-bottom: 1px solid #f2f2f2;
            font-weight: 500;
        }
        .news-list{
            padding: 20px;
            height: calc(100vh - 341px);
            background-color: #fff;
            text-align: center;
            .item-he,
            .item-me{
                display: flex;
                .item-he-head,
                .item-me-head{
                    width: 50px;
                    height: 50px;
                }
                .item-he-info,
                .item-me-info{
                    flex: 1;
                    em{
                        margin-left: 20px;
                        position: relative;
                        display: inline-block;
                        max-width: 50%;
                        font-size: 16px;
                        color: #333;
                        background-color: #f4f4f4;
                        padding: 10px 16px;
                        border-radius: 6px;
                    }
                    .item-he-date{
                        display: inline-block;
                        padding-top: 6px;
                        margin-left: 10px;
                        font-size: 14px;
                        color: #999;
                    }
                }
            }
            .item-he{
                text-align: left;
                .item-he-info{
                    em{
                        &::before{
                            position: absolute;
                            content: " ";
                            top: 10px;
                            left: -24px;
                            width:0px;
                            height:0px;
                            border-top: 8px solid transparent;
                            border-left: 13px solid  transparent;
                            border-right: 13px solid #f4f4f4;
                            border-bottom: 8px solid transparent;
                        }
                    }
                }
            }
            .item-me{
                flex-direction: row-reverse;
                text-align: right;
                .item-me-info{
                    em{
                        margin-left: 0px;
                        margin-right: 20px;
                        background-color: #574b90;
                        color: #fff;
                        &::before{
                            position: absolute;
                            content: " ";
                            top: 10px;
                            right: -24px;
                            width:0px;
                            height:0px;
                            border-top: 8px solid transparent;
                            border-left: 13px solid  #574b90;
                            border-right: 13px solid transparent;
                            border-bottom: 8px solid transparent;
                        }
                    }
                    .item-he-date{
                        margin-right: 10px;
                        margin-left: 0px;
                    }
                }
            }
            .item-date{
                display: inline-block;
                padding: 6px 8px;
                background-color: #f2f2f2;
                color:#808080;
                font-size: 14px;
                border-radius: 4px;
            }
        }
        .news-input{
            box-sizing: border-box;
            border-top: 1px solid #edecec;
            height: 130px;
            background-color: #fff;
            padding: 20px;
            .input-box{
                display: flex;
                background-color: #F4F4F4;
                border-radius: 4px;
                height: 50px;
                align-items: center;
                margin-top: 20px;
                i{
                    display: inline-block;
                    width: 50px;
                    height: 50px;
                    font-size: 30px;
                    color: #999;
                    text-align: center;
                    line-height: 50px;
                    border-right: 1px solid #ebe8e8;
                }
                /deep/ .el-input{
                    height: 50px;
                    input{
                        height: 100%;
                        border:none;
                        background-color: #F4F4F4;
                    }
                }
                .btn{
                    width: 90px;
                    height: 50px;
                    line-height: 50px;
                    background-color: #574B90;
                    color: #fff;
                    font-size: 16px;
                    padding: 0;
                    border: none;
                }
            }
        }
    }
    .info{
        h3{
            padding-left: 20px;
            height: 56px;
            line-height: 56px;
            font-size: 16px;
            color: #333;
            border-bottom: 1px solid #f2f2f2;
            background-color: #fff;
            font-weight: 500;
        }
        ul{
            height: calc(100vh - 211px);
            background-color: #fff;
            padding: 20px;
            li{
                display: flex;
                align-items: center;
                height: 30px;
                margin-bottom: 30px;
                em{
                    display: inline-block;
                    margin-left: 20px;
                }
            }
        }
    }
}
</style>